#ifndef LWRPSHADRES_SHADERLIBRARY_INSTANCING
#define LWRPSHADRES_SHADERLIBRARY_INSTANCING

#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/UnityInstancing.hlsl"

#define INSTANCING_PROPS_BEGIN UNITY_INSTANCING_BUFFER_START(Props)
#define INSTANCING_PROPS_END UNITY_INSTANCING_BUFFER_END(Props)
#define INSTANCING_PROP(type, var) UNITY_DEFINE_INSTANCED_PROP(type, var)
#define INSTANCING_REF(var) UNITY_ACCESS_INSTANCED_PROP(Props, var)

#ifdef _PERINSTANCEDATA_ON

#define PERINSTANCEDATA_BEGIN INSTANCING_PROPS_BEGIN
#define PERINSTANCEDATA_END INSTANCING_PROPS_END
#define PERINSTANCEDATA(type, var) INSTANCING_PROP(type, var)
#define PERINSTANCEDATA_REF(var) INSTANCING_REF(var)

#else

#define PERINSTANCEDATA_BEGIN
#define PERINSTANCEDATA_END
#define PERINSTANCEDATA(type, var) type var;
#define PERINSTANCEDATA_REF(var) var

#endif

#endif